package com.mars.diancan.pojo;

import com.mars.diancan.common.OrderStatusEnum;
import com.mars.diancan.common.PayStatusEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单主表
 * @author MARS
 * @date 2018/6/24
 */
@Entity
@Data
@DynamicUpdate
@Table(name = "wx_order_master")
public class OrderMaster {

    @Id
    private String orderId;
    private String buyerName;
    private String buyerPhone;
    private String buyerAddress;
    private String buyerOpenid;
    private BigDecimal orderAmount;
    private Integer orderStatus = OrderStatusEnum.NEW.getCode();
    private Integer payStatus = PayStatusEnum.WAIT.getCode();
    private Date createTime;
    private Date updateTime;

    // 增加OrderDetail
//    @Transient
//    List<OrderDetail> orderDetailList;
}
